package com.aizhixin.lab.docker.repository;

import com.aizhixin.lab.docker.entity.ContainerToImages;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

public interface ContainerToImagesRepository extends JpaRepository<ContainerToImages,String> {
    int deleteByCourseIdAndChapterIdAndUserId(String courseId, Long chapterId, Long userId);
    List<ContainerToImages> findByCourseIdAndChapterIdAndUserId(String courseId, Long chapterId, Long userId);
    List<ContainerToImages> findByCourseIdAndUserId(String courseId, Long userId);
    Integer countByCourseIdAndChapterIdAndUserIdAndIsAuto(String courseId, Long chapterId, Long userId, Boolean isAuto);
    Integer deleteByCourseId(String courseId);
    Integer deleteByCourseIdAndUserId(String courseId, Long userId);
}
